﻿using System;
using System.Collections.Generic;
using System.Configuration;
using System.Linq;
using System.Text;
using HPPServer;
using HPPNet;
using System.Net;
using System.Net.Sockets;
using HPPUtil;

namespace HPPServer
{
    class Program
    {
        static void Main(string[] args)
        {
#if TRACE
            try
            {

           
#endif
                SSServer server = new SSServer(10, Int16.MaxValue);
                server.Init();

                string portStr = ConfigurationManager.AppSettings["Port"];
                CommonLogger.Logger.Debug("SSServer Port: " + portStr);
                int port = int.Parse(portStr);
                server.Start(new IPEndPoint(IPAddress.Any, port));
                CommonLogger.Logger.Info("Server started");
                Console.ReadKey();
#if TRACE
            }
            catch (Exception ex)
            {
                CommonLogger.Logger.Fatal("Main()", ex);
                Console.ReadLine();
            }
#endif
            
        }
    }
}
